*******************************************************************************************************
*******************************************************************************************************
***REPLICATION MATERIALS FOR "Presenting the Governmental Incompatibilities Data Project (GIDP) 2.0"***
*******************************************************************************************************
*******************************************************************************************************

*set working directory
cd "C:\Users\pbw0011\Dropbox\GOVINC expansion\Data paper\ISQ Submission\Accepted\final_replication"

*Table 1
use GIDP_replication

ta claim_from
 
*Figure 1
clear all

*calling year-level data for this figure
use acd_civwar_inc_year

twoway line (territory gov year), scheme(s1mono) xtitle(year) ytitle(Countries w/civwar)
 
*Table 2
clear all

*calling c-year replication data again
use GIDP_replication

ta claim sd_group_dum, cell
 
*Table 3
 
ta claim
 
*Figure 2: Prevalence of governmental incompatibilities in the world (1960-2020)
 
clear all

*calling year-level data
use govinc_global_year
 
twoway line (claim year), scheme(s1mono) xtitle(year) ytitle(share of countries w/gov. inc.)

*Table 4: Countries in the GIDP 2.0 (1960-2020)

clear all

use GIDP_replication

keep if claim!=.
collapse (max) claim navco_nv govacd, by(ccode)
ta claim
ta claim if govacd!=1 & navco_nv!=1
ta govacd if navco_nv!=1
ta navco_nv if govacd!=1
ta claim if navco_nv==1 & govacd==1

*Table 5: Government composition claims

clear all

use GIDP_replication

ta gov_comp if claim==1 

*Table 6: Regime change claims

ta regime_change if claim==1

*Table 7: Electoral Legitimacy Claims

ta elect_legit if claim==1

*Table 8: Three types of claims

ta gov_comp_reg_ch

*Figure 3: "Prevalence of different claim types in governmental incompatibilities (1960-2020)"

clear all

*calling year-level data
use govinc_type_global_year

twoway line (elect_legit gov_comp regime_change year), scheme(s1mono) xtitle(year) ytitle(share of countries w/gov. inc. type)

*Table 9: Distribution of governmental incompatibilities across regime-type (1960-2018)
clear all

use GIDP_replication

ta claim X_REGIME_ord, col

*Figure 4: "Share of countries with governmental incompatibilities by regime-type (1960-2018)"
clear all 

*year-level data
use govinc_global_regime

twoway (line claim_dem year) (line claim_aut year) (line claim_anoc year) if year>=1960 & year<=2018, scheme(s1mono) title(Regime comparisons) xtitle(year) ytitle(share of regimes w/gov. inc.)

*Table 10: Claim types and regime type
clear all

use GIDP_replication

ta gov_comp_reg_ch X_REGIME_ord if claim==1, col

*Table 11: Table 11: Governmental incompatibilities across autocratic regime-type (1960-2010)

ta claim gwf_cat, col

*Table 12: Claim types and autocratic regimes

ta gov_comp_reg_ch gwf_cat if claim==1, col

**Appendix
*Table A1:

logit claim2year l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_NAVCO_nonviol_dummy c.claim2_pyrs##c.claim2_pyrs##c.claim2_pyrs, robust cluster(ccode) 

logit claimonset l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_NAVCO_nonviol_dummy c.claim2onset_pyrs##c.claim2onset_pyrs##c.claim2onset_pyrs if l.claim2year==0, robust cluster(ccode) 

*Table A2:

heckprob navco l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_NAVCO_nonviol_dummy c.navco_pyrs##c.navco_pyrs##c.navco_pyrs, select(claim2year = l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_GOVACD c.claim2_pyrs##c.claim2_pyrs##c.claim2_pyrs) robust cluster(ccode) 
 
heckprob govacd l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_GOVACD c.govacd_pyrs##c.govacd_pyrs##c.govacd_pyrs, select(claim2year = l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_NAVCO_nonviol_dummy c.claim2_pyrs##c.claim2_pyrs##c.claim2_pyrs) robust cluster(ccode) 

heckprob navco_onset l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_NAVCO_nonviol_dummy c.navco_onset_pyrs##c.navco_onset_pyrs##c.navco_onset_pyrs if l.navco==0, select(claim2year = l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_GOVACD c.claim2_pyrs##c.claim2_pyrs##c.claim2_pyrs) robust cluster(ccode) 

heckprob govacd_onset l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_GOVACD c.govacd_onset_pyrs##c.govacd_onset_pyrs##c.govacd_onset_pyrs if l.govacd==0 & l2.govacd==0, select(claim2year = l.Xautocracy l.Xanocracy l.lgdppc l.log_urbpop l.log_ruralpop l.ingos_ipolate l.territorycivilwar l.neighbor_NAVCO_nonviol_dummy c.claim2_pyrs##c.claim2_pyrs##c.claim2_pyrs) robust cluster(ccode) 
